#!/usr/bin/env python
#encoding=utf-8

import json
import sys
reload(sys)
sys.setdefaultencoding('utf-8')


f = open("11.txt")

content = ""
for l in f.readlines():
	content += l.strip("\n")


jj = json.loads(content, encoding="utf-8")

for i in range(0, len(jj["children"])):
	try:
		print jj["children"][i]["name"],
		print jj["children"][i]["code"]
		try:
			for j in range(0,len(jj["children"][i]["children"])):
				print jj["children"][i]["children"][j]["name"],
				print jj["children"][i]["children"][j]["code"]
				try:
					for w in range(0,len(jj["children"][i]["children"][j]["children"])):
						print jj["children"][i]["children"][j]["children"][w]["name"],
						print jj["children"][i]["children"][j]["children"][w]["code"]
						try:
							for k in range(0,len(jj["children"][i]["children"][j]["children"][w])):
								print jj["children"][i]["children"][j]["children"][w]["children"][k]["name"],
								print jj["children"][i]["children"][j]["children"][w]["children"][k]["code"]
						except:
							pass
				except:
					#print "333"
					pass
		except:
			#print "2222"
			pass
	except:
		#print "111"
		pass
		#print jj["children"][0]["children"][i]["name"],
		#print jj["children"][0]["children"][i]["code"]
